home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-22 | 1.7 KB | 68 lines | [TEXT/PJMM] |
- unit Utilities;
-
- interface
-
- uses
- InitTheMenus, Globals;
-
- procedure Wait (x: integer);
- function Randomize (range: integer): integer;
- procedure ResetWindow;
-
- implementation
-
- procedure Wait (x: integer);
- var
- dummy: longint;
- begin
- delay(x, dummy);
- end; {...Wait procedure}
-
- function Randomize (range: integer): integer;
-
- begin
- Randomize := (abs(Random) mod range) + 1
- end;
-
- procedure ResetWindow;
- procedure Renit_My_Menus; {Initialize the menus}
-
- var
- AppleMenu: MenuHandle; {Menu handle}
- M_File: MenuHandle; {Menu handle}
- M_Edit: MenuHandle; {Menu handle}
- M_Shapes: MenuHandle; {Menu handle}
-
- const
- Menu1 = 1001; {Menu resource ID}
- Menu2 = 1002; {Menu resource ID}
- Menu3 = 1003; {Menu resource ID}
- Menu4 = 1004; {Menu resource ID}
-
- begin {Start of Init_My_Menus}
- ClearMenuBar; {Clear any old menu bars}
-
- { This menu is the APPLE menu, used for About and desk accessories.}
- AppleMenu := GetMenu(Menu1);{Get the menu from the resource file}
- InsertMenu(AppleMenu, 0); {Insert this menu into the menu bar}
-
- M_File := GetMenu(Menu2); {Get the menu from the resource file}
- InsertMenu(M_File, 0); {Insert this menu into the menu bar}
-
- M_Edit := GetMenu(Menu3); {Get the menu from the resource file}
- InsertMenu(M_Edit, 0); {Insert this menu into the menu bar}
-
- M_Shapes := GetMenu(Menu4);{Get the menu from the resource file}
- InsertMenu(M_Shapes, 0); {Insert this menu into the menu bar}
-
- DrawMenuBar; {Draw the menu bar}
-
- end; {End of procedure Init_My_Menus}
-
-
- begin
- ShowDrawing;
- Renit_My_Menus;
- end;
-
- end.